package com.sam;

import com.alibaba.fastjson.JSON;
import com.sam.properties.EnvironmentReader;
import com.sam.properties.JobService;
import com.sam.properties.PropertiesConfig;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class AppStart {
    public static void main(String[] args) throws Exception {
        ConfigurableApplicationContext app = new SpringApplicationBuilder(AppStart.class).web(false).run(args);
//        JobService service = app.getBean(JobService.class);
//        service.getLowLevelJobs();
//        service.getDependentJobByName("job2");

        EnvironmentReader reader = app.getBean(EnvironmentReader.class);
        reader.readEnvironment("INSTANCE_NAME");
        reader.readEnvironment("INSTANCE_NUM");

    }
}
